package a_exception.d_throws;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class ThrowsDemo {
    //将异常声明到main方法上,实际上就是交给JVM处理,JVM处理的方式就是终止程序
    public static void main(String[] args) throws ParseException {
        show();
    }

    public static void show() throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        sdf.parse("2024-02-02");
    }
}





